package com.clouddot.baipai.model;


import android.content.Context;

import com.clouddot.baipai.contract.ISettingActivityContract;
import com.clouddot.baipai.http.BanPaiRetrofitHelper;
import com.clouddot.baipai.http.entity.response.bindBanPaiResponse;
import com.clouddot.baipai.http.entity.response.getAllClassResponse;
import com.clouddot.baipai.infrastructure.environment.Env;

import org.wxy.sdk.base.impl.BaseModelImpl;

import java.util.ArrayList;

import rx.Observable;

public class SettingActivityModel extends BaseModelImpl implements ISettingActivityContract.IModel {
    public SettingActivityModel(Context context) {
        super(context);

    }


    @Override
    public Observable<ArrayList<getAllClassResponse>> getAllClassList(String acttype) {
        return  BanPaiRetrofitHelper.getInstance(Env.getContent()).getServer().getAllClassList(Env.getAppContext().IP,acttype);
    }

    @Override
    public Observable<bindBanPaiResponse> bindBanPai(String acttype, String ClassId, String CardDeviceId) {
        return  BanPaiRetrofitHelper.getInstance(Env.getContent()).getServer().bindBanPai(Env.getAppContext().IP,acttype,ClassId,CardDeviceId);
    }
}
